1. Field of the Invention
The present application relates to the computer field, and more specifically, to a method for accelerating the BIOS running by means of Cache as RAM (CAR).
2. Description of Prior Art
When an existing computer system is powered on, a CPU reads a first instruction from a BIOS Flash ROM through a low speed bus, for example, ISA, LPC, FWH and so on, and begins to run the BIOS. After performing some simple power-on initializations on the CPU, chip sets and peripheral devices, the BIOS starts to initialize a memory. The CPU doesn't copy the BIOS main programs from the Flash ROM to the system memory until the initialization of the memory is completed. Then, the CPU reads instructions from the memory, so as to improve the running speed of the BIOS.
A method for improving the accessing speed to the memory by mapping the memory areas used by running of the BIOS programs with the CPU cache so as to accelerate the running of the BIOS programs is proposed in Chinese Patent Applications No. CN 03156907.2 and Chinese Patent No. CN 1641580.
A method for accelerating the BIOS running is proposed in the Chinese Patent Applications CN 03156907.2 and Chinese Patent No. CN 1641580. This method maps the memory areas used by the BIOS programs with the CPU cache. When running the BIOS programs, in the case of “Cache Hit”, the CPU reads BIOS instructions directly from the cache without reading them from the system memory, thus the running of the BIOS programs is accelerated.
A method for accelerating the running of an option ROM for an add-in card is proposed in US Patent Application No. US 2003/023812, wherein when the BIOS is to run the option ROM for a certain add-in card, it copies the option ROM to the system memory, and then maps this memory area with the CPU cache, so as to accelerate the running of the option ROM.
The above methods are encountered with following disadvantages:
1) These schemes cannot be applied until the system memory is available. However, at the initial stage of the BIOS running, the system memory is not available, and therefore, the above schemes cannot be applied.
2) Even though the above schemes are applied, it is not always the case of “Cache Hit” when the CPU reads the BIOS programs, where the CPU still needs to read the BIOS programs from the system memory.
In order to overcome the above problems so as to accelerate the BIOS running, the present invention provides a method, in which the CPU cache is set as RAM (random access memory) for use. Thus, even when the system memory is not available, the BIOS can be run in this section of RAM space, resulting in the greatly accelerated running of the BIOS.